package com.zyt.controller;

import com.zyt.pojo.User;
import com.zyt.service.UserSerice;
import com.zyt.service.impl.UserSericeImpl;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class UserController {
    UserSerice userSerice =new UserSericeImpl();
    @RequestMapping("/login")
    public String login(String name,String password){
        User user = userSerice.selectNameAndPassword(name, password);
        if (user!=null){
            return "/selectAll.do";
        }else {
            return "/login.jsp";
        }
    }
}
